<?
include "../db_config.php";

$sql = "select * from wps_submit_data order by submit_id desc limit 5";
$result = mysql_query($sql);
echo "<table border=1>\n";
$print_title = false;
while($data = mysql_fetch_array($result))
{
	echo "<tr valign=top>\n";
	if($print_title == false)
	{
		foreach($data as $key => $val)
		{
			if(is_int($key))
				continue;
			echo "<td> $key </td>\n";
		}
		echo "</tr>";
		echo "<tr valign=top>\n";
		$print_title = true;
	}

	foreach($data as $key => $val)
	{

		if(is_int($key))
			continue;
		echo "<td> " . htmlspecialchars($val) . " </td>\n";
	}
	echo "</tr>\n";
}
echo "</table>";

?>
